package scjp.threads.interaction;

public class ThreadA {

    public static void main(String args[]) {

        ThreadB b = new ThreadB();
        b.start();


        synchronized (b) {

            try {
                System.out.println("Waiting  for b to complete...");
                b.wait();

            } catch (InterruptedException ignore) {
            }


            System.out.println("Total is:" + b.getTotal());
        }

    }
}
